package org.yang.novel.down.util;

import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import java.io.IOException;

/**
 * @author shichenyang
 */
public class JsoupUtil {
    public static Document parseUrl(String url) throws IOException {
        //1.建立连接
        Connection connection = Jsoup.connect(url).ignoreContentType(true);
        //2.网页返回内容
        Connection.Response response = connection.execute();
        //3.加载网页内容信息
        Document document = Jsoup.parse(response.body());
        return document;
    }
}
